package edu.hut.bookshop.pojo;


import java.math.BigDecimal;
import java.util.Date;


public class Pay {

    public final static int pay_status_waiting = 0;//待支付
    public final static int pay_status_paid = 1;//已支付
    public final static int pay_status_refunded = 2;//已全额退款
    public final static int pay_status_part_refunded = 20;//已部分退款
    public final static int pay_status_closed = 3;//已关闭

    private static final long serialVersionUID = 1L;

    private Long payid;//唯一id

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    private Integer orderId;//订单号

    private String sn;//支付记录编号

    private String paySn;//支付平台交易号

    private BigDecimal totalAmount;//支付金额

    private Integer pstatus = pay_status_waiting;//支付订单状态

    private Integer payment ;//支付方式

    private BigDecimal totalRefundAmount = new BigDecimal(0);//退款总金额

    private Date payTime;//支付时间

    private Date refundTime;//退款时间

    private Date createTime;//创建时间

    private Date updateTime;//更新时间

    public Pay() {
    }

    public static int getPay_status_waiting() {
        return pay_status_waiting;
    }

    public static int getPay_status_paid() {
        return pay_status_paid;
    }

    public static int getPay_status_refunded() {
        return pay_status_refunded;
    }

    public static int getPay_status_part_refunded() {
        return pay_status_part_refunded;
    }

    public static int getPay_status_closed() {
        return pay_status_closed;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Long getPayid() {
        return payid;
    }

    public void setPayid(Long payid) {
        this.payid = payid;
    }

    public String getSn() {
        return sn;
    }

    public void setSn(String sn) {
        this.sn = sn;
    }

    public String getPaySn() {
        return paySn;
    }

    public void setPaySn(String paySn) {
        this.paySn = paySn;
    }

    public BigDecimal getTotalAmount() {
        return totalAmount;
    }

    public void setTotalAmount(BigDecimal totalAmount) {
        this.totalAmount = totalAmount;
    }



    public Integer getPayment() {
        return payment;
    }

    public void setPayment(Integer payment) {
        this.payment = payment;
    }

    public BigDecimal getTotalRefundAmount() {
        return totalRefundAmount;
    }

    public void setTotalRefundAmount(BigDecimal totalRefundAmount) {
        this.totalRefundAmount = totalRefundAmount;
    }

    public Date getPayTime() {
        return payTime;
    }

    public void setPayTime(Date payTime) {
        this.payTime = payTime;
    }

    public Date getRefundTime() {
        return refundTime;
    }

    public void setRefundTime(Date refundTime) {
        this.refundTime = refundTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getPstatus() {
        return pstatus;
    }

    public void setPstatus(Integer pstatus) {
        this.pstatus = pstatus;
    }

    @Override
    public String toString() {
        return "Pay{" +
                "payid=" + payid +
                ", orderId=" + orderId +
                ", sn='" + sn + '\'' +
                ", paySn='" + paySn + '\'' +
                ", totalAmount=" + totalAmount +
                ", pstatus=" + pstatus +
                ", payment=" + payment +
                ", totalRefundAmount=" + totalRefundAmount +
                ", payTime=" + payTime +
                ", refundTime=" + refundTime +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                '}';
    }
}
